package cn.gjculture.shopping.api.entity;

import lombok.Data;
import lombok.Getter;
import java.util.List;

@Data
public class Activity {
    private String activityId;
    private String activityName;
    private String activityDesc;
    private String adImage;
    private Long insertTime;
    private Long updateTime;
    private Long startTime;
    private Long endTime;
    private String authorId;
    private Integer event=Event.MARKETING.getValue();
    //0,生效；1，新建
    private Integer status=1;
    //0 表示全部等级会员,多个用逗号分隔
    private String customerLevel="0";

    /**
     * @Value Commodity.CommodityType.value
     */
    //0 代表全部，多个以，分隔
    private String commodityType="0";

    private List<Discount> discounts;
    //商品分类或者酒店
    private List<String> goodsTypeIds;
    //房型或者商品
    private List<String> goodsIds;


    public enum Event{
        NEW_CUSTOMER(1),FOCUS(2),UPGRADE(3),MARKETING(4);
        Event(Integer value){
            this.value=value;
        }
        @Getter
        private Integer value;
    }

    @Data
    public static class ActivityGoodsType{
        public ActivityGoodsType(String activityId,String goodsTypeId){
            this.activityId=activityId;
            this.goodsTypeId=goodsTypeId;
        }
        private String activityId;
        private String goodsTypeId;
    }

    @Data
    public static class ActivityGoods{
        private String activityId;
        private String goodsId;
        public ActivityGoods(String activityId,String goodsId){
            this.activityId=activityId;
            this.goodsId=goodsId;
        }
    }
}
